<script src="${rc.getContextPath()}/manage/js/dwzCustomJs/dwz.custom.advancedquery.js?v=${ver}" type="text/javascript"></script>
<#include "/common/pagerForm.html">
<form rel="pagerForm" method="post" action="" onsubmit="return navTabSearch(this)">
	<input type="hidden" id="advancedStatus" name="advancedStatus" value="${condition.advancedStatus!''}" />
	<div class="pageHeader">
		<div class="searchBar">
			<ul class="searchContent">
				<li><label><@label key='productionControlNum.C,colon'>生产管理号：</@label></label> <input type="text" name="productionControlNum" value="${condition.productionControlNum!''}" /></li>
				<li><label><@label key='orderType.C,colon'>订单类型：</@label></label> <select name="orderTypeCode">
						<option value=""><@label key='all.C'>所有</@label></option> <#if orderTypes??> <#list orderTypes as orderType>
						<option value="${orderType.orderTypeCode!''}"<#if condition.orderTypeCode?? && condition.orderTypeCode == orderType.orderTypeCode> selected</#if> >${orderType.orderTypeText!''}</option> </#list> </#if>
				</select></li>
				<li><label><@label key="workCenter.C,colon">工作中心：</@label></label> <input id="workCenterLookup.workCenterText" name="workcenterText" type="text" value="${condition.workcenterText!''}" postField="workCenterCode" value="${condition.workCenterText!''}" suggestFields="workCenterCode,workCenterText" suggestUrl="${rc.getContextPath()}/manage/workCenter/workCenterSuggest" lookupGroup="workCenterLookup" /></li>
			</ul>
		</div>
		<div class="searchBar">
			<ul class="searchContent">
				<li><label><@label key='qmOperation.C,colon'>质检工序：</@label></label> <input class="look" id="operationLookup.operationText" name="operationText" type="text" value="${condition.operationText!''}" postField="operationCode" suggestFields="operationCode,operationText" suggestUrl="${rc.getContextPath()}/manage/operation/operationSuggest" lookupGroup="operationLookup" /> <a class="btnLook" href="${rc.getContextPath()}/manage/operation/operationLookUp?lookupType=radio&operationTypeEcode=QUALITY" rel="operationLookup_dialog" title="<@label key='select.C,qmOperation.C'>选择工序</@label>" lookupGroup="operationLookup"></a></li>
				<li><label><@label key="workUnit.C,colon">作业单元：</@label></label> <input class="look" id="workUnitLookup.workUnitText" name="workunitText" type="text" value="${condition.workunitText!''}" postField="workUnitCode" suggestFields="workUnitCode,workUnitText" suggestUrl="${rc.getContextPath()}/manage/workUnit/workUnitSuggest" lookupGroup="workUnitLookup" /> <a class="btnLook" href="${rc.getContextPath()}/manage/workUnit/workUnitLookUp?lookupType=radio" rel="workUnitLookup_dialog" title="<@label key='select.C,workUnit.C'>选择作业单元</@label>" lookupGroup="workUnitLookup"></a></li>
				<li><label><@label key='defectDefine.C,colon'>缺陷：</@label></label> <input class="look" id="inspextDefectLookup.defectText" name="defectText" type="text" value="${condition.defectText!''}" postField="suggestTest" suggestFields="defectCode,defectText" suggestUrl="${rc.getContextPath()}/manage/defect/defectSuggest" lookupGroup="inspextDefectLookup" /> <a class="btnLook" href="${rc.getContextPath()}/manage/defect/defectLookUp?lookupType=radio" rel="defectLookup_dialog" title="<@label key='select.C,defectDefine.C'>选择缺陷</@label>" lookupGroup="inspextDefectLookup"></a></li>
				<li class="query">
					<div class="buttonActive">
						<div class="buttonContent">
							<button type="submit"><@label key="query.B">查询</@label></button>
						</div>
					</div>
				</li>
				<li class="advancedQuery"><a id="advancedQuery" href="javascript:void(0);" onclick="openAdvanced(navTab.getCurrentPanel())"> <@label key="advancedQuery.C">高级查询</@label> </a> <span onclick="openAdvanced(navTab.getCurrentPanel());"></span></li>
			</ul>
		</div>
	</div>
	<div id="collapsablePanel" style="display: none;" class="pageHeader">
		<div class="searchBar">
			<ul class="searchContent">
				<li><label><@label key='materialCode.C,colon'>物料编号：</@label></label> <input type="text" name="materialCode" value="${condition.materialCode!''}" /></li>
				<li><label><@label key='materialText.C,colon'>物料名称：</@label></label> <input type="text" name="materialText" value="${condition.materialText!''}" /></li>
				<li><label><@label key='productionlotNum.C,colon'>生产批次号：</@label></label><input type="text" name="productionlotNum" value="${condition.productionlotNum!''}" /></li>
			</ul>
			<ul class="searchContent">
				<li><label><@label key='inspectUser.C,colon'>检验人员：</@label></label> <input type="text" name="createUser" value="${condition.createUser!''}" /></li>
				<li><label><@label key='inspectDateTime.C,colon'>点检时间：</@label></label> <input type="text" class="date" readonly="readonly" name="minCreateDateTime" datefmt="yyyy-MM-dd HH:mm:ss" max_Date="{maxCreateDateTime}" value="${condition.minCreateDateTime!''}" /><a class="inputDateButton" href="javascript:;">选择</a></li>
				<li><label><@label key="to.C,colon">至：</@label></label> <input type="text" class="date" readonly="readonly" name="maxCreateDateTime" datefmt="yyyy-MM-dd HH:mm:ss" min_Date="{minCreateDateTime}" value="${condition.maxCreateDateTime!''}" /><a class="inputDateButton" href="javascript:;">选择</a></li>
			</ul>
			<ul class="searchContent">
				<li><label><@label key='customer.C,colon'>客户：</@label></label> <input type="text" name="customer" value="${condition.customer!''}" /></li>
				<li><label><@label key='customerOrder.C,colon'>客户订单：</@label></label> <input type="text" name="customerOrder" value="${condition.customerOrder!''}" /></li>
				<li><label><@label key='priority.C,colon'>优先级：</@label></label> <input type="text" name="priority" value="${condition.priority!''}" /></li>
			</ul>
		</div>
	</div>
</form>

<div class="pageContent">

	<div class="panelBar">
		<ul class="toolBar">
			<@buttonRight menuCode="operation_add" labelKey="add.B" defalutName="导出excel">
			<li><a class="export" href="${rc.getContextPath()}/manage/inspectRecord/exportToExcel" target="dwzExport" targetType="navTab" title="<@label key='confirmexportToExcel.M'>确定要导出这些记录吗?</@label>"><span><@label key="exportToExcel.D">导出EXCEL</@label></span></a></li> </@buttonRight> <@buttonRight menuCode="service_view" labelKey="view.B" defalutName="详情">
			<li><a class="icon" target="dialog" mask="true" resizable="false" width="900" height="615" rel="viewInspectRecord" href="${rc.getContextPath()}/manage/inspectRecord/viewInspectRecord?id={inspectRecord_id}&navTabId=${navTabId!''}"><span><@label key="view.B">详情</@label></span></a></li></@buttonRight>
		</ul>
	</div>
	<table class="table" width="1904px" layoutH="164">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="30"><@label key="serialNumber.C">序号</@label></th>
				<th width="120" orderField="productionControlNum" <#if (page.orderField?? && page.orderField == 'productionControlNum')>class="${page.orderDirection!''}"</#if>><@label key='productionControlNum.C'>生产管理号</@label></th>
				<th width="120" orderField="productionOrderNum" <#if (page.orderField?? && page.orderField == 'productionOrderNum')>class="${page.orderDirection!''}"</#if>><@label key='productionOrderNum.C'>生产订单编号</@label></th>
				<th width="80"><@label key='orderType.C'>订单类型</@label></th>
				<th width="100"><@label key='materialCode.C'>物料编号</@label></th>
				<th width="100"><@label key='materialText.C'>物料描述</@label></th>
				<th width="80"><@label key='productionlotNum.C'>生产批次号</@label></th>
				<th width="80"><@label key='inspectUser.C'>检验人员</@label></th>
				<th width="120"><@label key='inspectDateTime.C'>点检时间</@label></th>
				<th width="100"><@label key="workCenterCode.C">工作中心编号</@label></th>
				<th width="100"><@label key="workCenterText.C">工作描述</@label></th>
				<th width="100"><@label key="workUnitCode.C">作业单元编号</@label></th>
				<th width="100"><@label key="workUnitText.C">作业单元描述</@label></th>
				<th width="100"><@label key="qmOperation.C,code.C">质检工序编号</@label></th>
				<th width="100"><@label key="qmOperation.C,name.C">质检工序名称</@label></th>
				<th width="100"><@label key="defectCode.C">缺陷编号</@label></th>
				<th width="100"><@label key="defectText.C">缺陷描述</@label></th>
				<th width="50"><@label key="defectDefine.C,quantity.C">缺陷数量</@label></th>
				<th width="50"><@label key="attachment.C,quantity.C">附件数量</@label></th>
				<th width="80"><@label key='customer.C'>客户</@label></th>
                <th width="100"><@label key='customerOrder.C'>客户订单</@label></th>
                <th width="80"><@label key='priority.C'>优先级</@label></th>
			</tr>
		</thead>
		<tbody>
			<#if page??><#if (page.data?size>0)> <#list page.data as inspectRecord>
			<tr target="inspectRecord_id" rel="${inspectRecord.id!''}">
				<td><input name="ids" value="${defect.defectCode!''}" type="checkbox"></td>
				<td>${page.startRow + inspectRecord_index}</td>
				<td>${inspectRecord.productionControlNum!''}</td>
				<td>${inspectRecord.productionOrderNum!''}</td>
				<td>${inspectRecord.orderTypeText!''}</td>
				<td>${inspectRecord.materialCode!''}</td>
				<td>${inspectRecord.materialText!''}</td>
				<td>${inspectRecord.productionlotNum!''}</td>
				<td>${inspectRecord.createUser!''}</td>
				<td>${(inspectRecord.createDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
				<td>${inspectRecord.workcenterCode!''}</td>
				<td>${inspectRecord.workcenterText!''}</td>
				<td>${inspectRecord.workunitCode!''}</td>
				<td>${inspectRecord.workunitText!''}</td>
				<td>${inspectRecord.operationCode!''}</td>
				<td>${inspectRecord.operationText!''}</td>
				<td>${inspectRecord.defectCode!''}</td>
				<td>${inspectRecord.defectText!''}</td>
				<td>${inspectRecord.quantity!''}</td>
				<td>${inspectRecord.attachmentCount!''}</td>
				<td>${inspectRecord.customer!''}</td>
                <td>${inspectRecord.customerOrder!''}</td>
                <td>${inspectRecord.priority!''}</td>
			</tr>
			</#list> <#else>
			<tr target="inspectRecord_id">
				<td colspan="8" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
			</tr>
			</#if> <#else>
			<tr target="inspectRecord_id">
				<td colspan="8" class="noData">======<@label key='noListData.C'>列表无数据</@label>=====</font></td>
			</tr>
			</#if>
		</tbody>
	</table>
	<#include "/common/panelBar.html">
</div>

<script type="text/javascript">
	$(function() {
		initAdvancedQuery(navTab.getCurrentPanel());

	});
</script>
